package com.xy.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by xiaoyuan on 2017/11/15.
 */
//java代码一样可以
@RestController
public class HiController {
    @RequestMapping("/hi")
    public String greeting(@RequestParam(value="name", defaultValue="LightSword") String name){
        return name;
    }

}
